// import 'whatwg-fetch';
// import 'custom-event-polyfill';
import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import { registerMicroApps, start } from 'qiankun';

Vue.use(ElementUI);
Vue.config.productionTip = false;

new Vue({
  router,
  render: (h) => h(App),
}).$mount("#app");

registerMicroApps([
  {
    name: 'angular7-hash',
    entry: '//localhost:7100',
    container: '#container',
    activeRule: '/app-angular7-hash',
  },
  {
    name: 'angular7-history',
    entry: '//localhost:7200',
    container: '#container',
    activeRule: '/app-angular7-history',
  },
  {
    name: 'angular9-hash',
    entry: '//localhost:7300',
    container: '#container',
    activeRule: '/app-angular9-hash',
  },
  {
    name: 'angular9-history',
    entry: '//localhost:7400',
    container: '#container',
    activeRule: '/app-angular9-history',
  },
  {
    name: 'jquery',
    entry: '//localhost:7500',
    container: '#container',
    activeRule: '/app-jquery',
  },
  {
    name: 'react16-hash',
    entry: '//localhost:7600',
    container: '#container',
    activeRule: '/app-react16-hash',
  },
  {
    name: 'react16-history',
    entry: '//localhost:7700',
    container: '#container',
    activeRule: '/app-react16-history',
  },
  {
    name: 'vue2-hash',
    entry: '//localhost:7800',
    container: '#container',
    activeRule: '/app-vue2-hash',
  },
  {
    name: 'vue2-history',
    entry: '//localhost:7900',
    container: '#container',
    activeRule: '/app-vue2-history',
  },
  {
    name: 'vue3-hash',
    entry: '//localhost:8100',
    container: '#container',
    activeRule: '/app-vue3-hash',
  },
  {
    name: 'vue3-history',
    entry: '//localhost:8200',
    container: '#container',
    activeRule: '/app-vue3-history',
  },
]);
// 启动 qiankun
start();